<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateActivityFeedbackNoticeLog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_feedback_notice_log', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('activityId')->comment('activity.id')->comment(0);
            $table->unsignedBigInteger('systemNotifyCenterId')->comment('消息id system_notify_center.id')->default(0);
            $table->time('remindDailyTime')->comment('每日通知时间')->default('00:00:00');
            $table->unsignedInteger('noticeTime')->default(0)->comment('实际通知时间');
            $table->json('shopIdList')->nullable()->default('')->comment('通知门店ids');
            $table->json('userIdList')->nullable()->default('')->comment('通知用户ids');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->unsignedTinyInteger('isDeleted')->default(0)->comment('是否删除 0 否 1是');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '活动回传提醒通知日志';
            $table->index(['activityId'], 'idx_activityId');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('activity_feedback_notice_log');
    }
}
